﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.master" Inherits="System.Web.Mvc.ViewPage<MedicViet.Models.mvNew>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    MedicViet - Dịch Vụ
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <h6>Thêm dịch vụ</h6>
    <script src="<%: Url.Content("~/Scripts/jquery.validate.min.js") %>" type="text/javascript"></script>
    <script src="<%: Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js") %>"
        type="text/javascript"></script>
    <link href="../../Content/CLE_Editor/jquery.cleditor.css" rel="stylesheet" type="text/css" />
    <script src="../../Content/CLE_Editor/jquery.cleditor.js" type="text/javascript"></script>
    <script src="../../Content/CLE_Editor/jquery.cleditor.min.js" type="text/javascript"></script>
    <script type="text/javascript">
        $(document).ready(function () {
            $("#nContent").cleditor({ width: 600, height: 300, useCSS: true })[0].focus();
        });
    </script>

    <% using (Html.BeginForm())
       { %>
    <%: Html.ValidationSummary(true) %>
        <div class="editor-label">
            <%: Html.LabelFor(model => model.title, "Tiêu đề :")%>
        </div>
        <div class="editor-field">
            <%: Html.EditorFor(model => model.title)%>
            <%: Html.ValidationMessageFor(model => model.title) %>
        </div>
        <div class="editor-label">
            <%: Html.LabelFor(model => model.nContent, "Nội Dung :")%>
        </div>
        <div class="editor-field">
            <%: Html.TextAreaFor(model => model.nContent) %>
            <%: Html.ValidationMessageFor(model => model.nContent) %>
        </div>
        <div class="editor-label">
            <%: Html.LabelFor(model => model.description, "Mô Tả :") %>
        </div>
        <div class="editor-field">
            <%: Html.TextAreaFor(model => model.description, new { cols = "40", rows = "5" })%>
            <%: Html.ValidationMessageFor(model => model.description) %>
        </div>
        <div class="editor-label">
                <script src="../../Content/JSUpload/swfupload.js" type="text/javascript"></script>
                <script src="../../Content/JSUpload/jquery-asyncUpload-0.1.js" type="text/javascript"></script>
                <script>
            $(function () {
                $("#thumbPath").makeAsyncUploader({
                    flash_url: '../../Content/JSUpload/swfupload.swf',
                    button_image_url: '../../Content/JSUpload/blankButton.png',
                    disableDuringUpload: 'INPUT[type="submit"]',
                });
            });        
        </script> 
            <%: Html.LabelFor(model => model.thumbPath, "Upload Ảnh :")%>
        </div>
        <div class="editor-field">
            <input type="file" name="thumbPath" id="thumbPath" />
        </div>
        <p>
            <input type="submit" value="Đăng Tin"  class="button" />
        </p>
    <% } %>
</asp:Content>
